import 'package:flutter/material.dart';
import 'package:moose_app/ui/values/constants.dart';
import 'package:moose_app/ui/widgets/search/search_input.dart';

import 'search_discovery_item.dart';
import 'search_history_item.dart';
import 'search_hot_item.dart';

class ATHSearchScreen extends StatelessWidget {
  static final String routeName = "app://search";

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        centerTitle: false,
        title: ATHSearchInput(
          hintText: "搜索",
        ),
      ),
      body: ATHSearchBody(),
    );
  }
}

class ATHSearchBody extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // ATHFocusUtil.requestFocus(context);
    return SingleChildScrollView(
      child: Container(
        margin: EdgeInsets.symmetric(vertical: kSize20, horizontal: kSize20)
            .copyWith(bottom: kSize60),
        child: Column(
          children: [
            ATHHistorySearchItem(),
            ATHSearchDiscoveryItem(),
            ATHSearchHotItem(),
          ],
        ),
      ),
    );
  }
}
